package com.itbaizhan;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;

@Slf4j
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
public class UserComsumerApplication {

    public static void main(String[] args) {

        SpringApplication.run(UserComsumerApplication.class, args);
        log.info("##########消费者启动成功######");
    }

}
/*先启动providerApplication,与启动UserConsumerApplication*/


/*Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable driver class


Action:

Consider the following:
	If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
	If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).


因为新建的 Springboot 项目 maven 依赖底层的父项目，底层的父项目有引入 mysql 链接相应的包，所以在启动的时候会有一些自动配置不能启动。这时候需要在主函数所在的类注解上加上删除自动配置即可。

@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)//排除自动配置
*/